package demo2;

public class Test2 {
    public static void main(String[] args) throws CloneNotSupportedException{
        Person2 p1 = new Person2("张三", 18);
        Person2 p2 = (Person2) p1.clone();

        System.out.println(p1);
        System.out.println(p2);

        p1.money.money = 100;
        System.out.println(p1);
        System.out.println(p2);
    }
}
